.class Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;
.super Ljava/lang/Thread;
.source "ShareToMicroBlog.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/netease/newsreader/activity/ShareToMicroBlog;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "postEditMessage4netease"
.end annotation


# instance fields
.field private img:Ljava/lang/String;

.field private msg4netease:Ljava/lang/String;

.field private s:Ljava/lang/String;

.field private t:Ljava/lang/String;

.field final synthetic this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;


# direct methods
.method public constructor <init>(Lcom/netease/newsreader/activity/ShareToMicroBlog;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 1
    .parameter
    .parameter "message"
    .parameter "t"
    .parameter "s"
    .parameter "img"

    .prologue
    .line 797
    iput-object p1, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;

    .line 791
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    .line 787
    const-string v0, ""

    iput-object v0, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->msg4netease:Ljava/lang/String;

    .line 788
    const-string v0, ""

    iput-object v0, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->t:Ljava/lang/String;

    .line 789
    const-string v0, ""

    iput-object v0, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->s:Ljava/lang/String;

    .line 790
    const-string v0, ""

    iput-object v0, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->img:Ljava/lang/String;

    .line 793
    iput-object p2, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->msg4netease:Ljava/lang/String;

    .line 794
    iput-object p3, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->t:Ljava/lang/String;

    .line 795
    iput-object p4, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->s:Ljava/lang/String;

    .line 796
    iput-object p5, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->img:Ljava/lang/String;

    return-void
.end method


# virtual methods
.method public run()V
    .locals 7

    .prologue
    const/4 v6, 0x1

    .line 801
    new-instance v2, Landroid/os/Message;

    invoke-direct {v2}, Landroid/os/Message;-><init>()V

    .line 802
    .local v2, msg:Landroid/os/Message;
    iput v6, v2, Landroid/os/Message;->what:I

    .line 805
    :try_start_0
    iget-object v4, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->msg4netease:Ljava/lang/String;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v5, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v4, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;

    invoke-virtual {v4}, Lcom/netease/newsreader/activity/ShareToMicroBlog;->getShortUrl()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    iput-object v4, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->msg4netease:Ljava/lang/String;

    .line 806
    const-string v4, "tblog4j.oauth.consumerKey"

    const-string v5, "zK8tVL3Nj4JOgqFL"

    invoke-static {v4, v5}, Ljava/lang/System;->setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    .line 807
    const-string v4, "tblog4j.oauth.consumerSecret"

    const-string v5, "l6Kkp4nszxRx3OBndw7C8ZRjthvzTqEv"

    invoke-static {v4, v5}, Ljava/lang/System;->setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    .line 808
    const-string v4, "tblog4j.debug"

    const-string v5, "false"

    invoke-static {v4, v5}, Ljava/lang/System;->setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    .line 810
    new-instance v3, Lt4j/TBlog;

    invoke-direct {v3}, Lt4j/TBlog;-><init>()V

    .line 812
    .local v3, tblog:Lt4j/TBlog;
    iget-object v4, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;

    invoke-static {v4}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v4

    if-eqz v4, :cond_0

    .line 813
    const-string v4, "10.0.0.172"

    const/16 v5, 0x50

    invoke-virtual {v3, v4, v5}, Lt4j/TBlog;->setHttpProxy(Ljava/lang/String;I)V

    .line 816
    :cond_0
    iget-object v4, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->t:Ljava/lang/String;

    iget-object v5, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->s:Ljava/lang/String;

    invoke-virtual {v3, v4, v5}, Lt4j/TBlog;->setToken(Ljava/lang/String;Ljava/lang/String;)V

    .line 819
    iget-object v4, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->msg4netease:Ljava/lang/String;

    invoke-virtual {v3, v4}, Lt4j/TBlog;->updateStatus(Ljava/lang/String;)Lt4j/data/Status;

    .line 822
    const/4 v4, 0x0

    iput v4, v2, Landroid/os/Message;->arg1:I
    :try_end_0
    .catch Lt4j/TBlogException; {:try_start_0 .. :try_end_0} :catch_0

    .line 847
    .end local v3           #tblog:Lt4j/TBlog;
    :cond_1
    :goto_0
    iget-object v4, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4netease;->this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;

    iget-object v4, v4, Lcom/netease/newsreader/activity/ShareToMicroBlog;->reflashormoreDataHandler:Landroid/os/Handler;

    invoke-virtual {v4, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 849
    return-void

    .line 823
    :catch_0
    move-exception v0

    .line 825
    .local v0, e1:Lt4j/TBlogException;
    const-string v4, "sharetomicroblog"

    invoke-virtual {v0}, Lt4j/TBlogException;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v4, v5}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 827
    invoke-virtual {v0}, Lt4j/TBlogException;->toString()Ljava/lang/String;

    move-result-object v1

    .line 829
    .local v1, errorinfo:Ljava/lang/String;
    const-string v4, "200 OK"

    invoke-virtual {v1, v4}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v4

    if-nez v4, :cond_1

    .line 832
    iput v6, v2, Landroid/os/Message;->arg1:I

    goto :goto_0
.end method
